import 'package:syn_4s/core/constants/sp_key.dart';
import 'package:syn_4s/core/model/user_tag_model.dart';

import '../model/base/api_result_data.dart';
import '../model/login_model.dart';
import '../utils/dio_utils.dart';
import '../utils/sp_utils.dart';

class TagRequest {
  static Future<ApiResultData<LoginModel>> getTags() async {
    String projId = await SPUtils.get(keyProjId);
    final url = "/api/Projs/tags?projId=$projId";
    final result = await DioUtils.instance.requestBaseUrl(url);

    ApiResultData<LoginModel> apiResultData =
    ApiResultData<LoginModel>.fromJson(result, LoginModel.fromJson);
    // 2.json转model
    return apiResultData;
  }
}
